package com.powernode.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: powernode
 */
@RestController
public class TestController {

    @GetMapping("index")
    public String index() {
        return "index";
    }

    @GetMapping("aa")
    @PreAuthorize("hasAuthority('sys:user:add')")
    public String aa() {
        return "index";
    }


    @GetMapping("bb")
    @PreAuthorize("hasAuthority('sys:user:xx')")
    public String bb() {
        return "bb";
    }
}
